// bloc/ai_chat/ai_chat_state.dart (*** NEW ***)

import '../../api/chat/ChatDataParser.dart';

abstract class AiState {
}

class ChatMessage extends AiState {
  final String text;
  final bool isUser;
  ChatMessage({required this.text, required this.isUser});
}

class AiChatState extends AiState {
  final List<ChatMessage> messages;
  AiChatState({required this.messages});
}


class AiChatLoadingState extends AiState {
}


class AiChatSuccessState extends AiState {
  final Map<String,dynamic> messages;
  AiChatSuccessState({required this.messages});
}

class AiChatSuccessRspState extends AiState {
  final Map<String,dynamic> messages;
  AiChatSuccessRspState({required this.messages});
}

class AiChatSendState extends AiState {
  final String msgData;
  AiChatSendState({required this.msgData});
}


class AiChatStreamDataState extends AiState {
  final ChatStreamMessage message;

  AiChatStreamDataState({required this.message});
}

class AiChatStreamCompleteState extends AiState {
  AiChatStreamCompleteState();
}

class AiChatErrorState extends AiState {
  final String error;

  AiChatErrorState(this.error);
}
